package com.yunsom.testdemo.design.watcher;

/**
 * @author Xbao
 * @version 1.0
 * @description
 * @date 2021/3/22 20:07
 */
public class HexaAbstractObserver extends AbstractObserver {


  public HexaAbstractObserver(Subject subject){
    this.subject = subject;
    this.subject.attach(this);
  }

  @Override
  public void update() {
    System.out.println("hexa string:"+Integer.toHexString(subject.getState()));
  }
}
